//统一管理ajax请求
import ajax from './ajax';

import mockAjax from './mockAjax';

//发送请求 获取三级分类列表的数据
export const reqCategoryListData = ()=>ajax.get('/product/getBaseCategoryList')

//获取轮播图时候的接口函数
export const reqGetBannerListData = ()=> mockAjax.get('/bannerList')
//获取楼层数据
export const reqGetFloorListData = ()=> mockAjax.get('/floorList')
//获取搜索商品数据
export const reqSearchGoodsInfoData = (searchParams)=> ajax.post('/list',searchParams);
//获取商品详情数据
export const reqGoodsDetailInfoData = (id)=>ajax.get('/item/' + id)

//添加或者更新商品到购物车
export const reqAddToCart = (skuId,skuNum)=>ajax.post(`/cart/addToCart/${skuId}/${skuNum}`)
//获取购物车列表
export const getCartList = ()=>ajax.get('/cart/cartList')
